﻿<%@ Page Title="" Language="VB" MasterPageFile="~/Pages/Inicio.master" AutoEventWireup="false" CodeFile="OrdenServicioListado.aspx.vb" Inherits="Pages_Default" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<%@ Register Src="~/UserControl/OrdenServicioNota.ascx" TagPrefix="uc1" TagName="OrdenServicioNota" %>


<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    
    <asp:Button ID="btnAnular" runat="server" style="display:none"/>
    <asp:ModalPopupExtender ID="popupAnularOrden" runat="server" TargetControlID="btnAnular" BackgroundCssClass="transparenciapopup" PopupControlID="panelAnular">
    </asp:ModalPopupExtender>
    <asp:Panel ID="panelAnular" runat="server" style="display:none">
        <asp:UpdatePanel ID="uppAnular" runat="server">
            <ContentTemplate>
                <div class="textright">
                    <table style="width:100%">
                        <tr><td class="subtittle" style="text-align:left">Anulación de Orden</td>
                            <td class="textright"><asp:ImageButton ID="ibtnCerrarPanel" runat="server" ImageUrl="~/Images/img/cerrar.png"></asp:ImageButton></td></tr>
                    </table>
                </div>
                <div style="background-color:white; border-color:navy; border-width:2px">
                    <table>
                        <tr><td class="textleft">Orden:<asp:Label ID="LblOrden" runat="server"></asp:Label>
                            </td></tr>
                        <tr><td class="textleft">Motivo Anulación</td></tr>
                        <tr><td>
                            <asp:TextBox ID="txbMotivo" runat="server" CssClass="textleft" TextMode="MultiLine" Width="297px" Height="55px"></asp:TextBox>
                            </td></tr>
                        <tr><td class="textcenter">
                            <asp:ImageButton ID="ibtnAnular" runat="server" ImageUrl="~/Images/texto/btnGrabar.png"  />
                            </td></tr>
                    </table>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </asp:Panel>

    <asp:Button ID="btnNota" runat="server" style="display:none"/>
    <asp:ModalPopupExtender ID="popupNota" runat="server" TargetControlID="btnNota" BackgroundCssClass="transparenciapopup" PopupControlID="panelNotas">
    </asp:ModalPopupExtender>
    <asp:Panel ID="panelNotas" runat="server" Style="display:none">
        <asp:UpdatePanel ID="uppNota" runat="server">
            <ContentTemplate>
                <div class="textright"><asp:ImageButton ID="ibtnCerrarNota" runat="server" ImageUrl="~/Images/img/cerrar.png" style="width: 20px"></asp:ImageButton></div>
                <div style="background-color:white; border-color:navy; border-width:2px">
                    <uc1:OrdenServicioNota runat="server" ID="OrdenServicioNota1" />
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </asp:Panel>

    <asp:Button ID="btnAgenda" runat="server" Style="display:none" />


    <asp:UpdatePanel ID="uppListarOrdenes" runat="server">
        <ContentTemplate>
            <div class="estandardiv" >
            <br />
            <div class="subtittle" style="width:95%" >Lista de Órdenes de Servicio</div>
            <br />
            <center>
            <table style="width:750px">
                <tr><td class="textright">Categoría</td>
                    <td class="textleft">
                        <asp:DropDownList ID="ddlbCategoria" runat="server" CssClass="textleft" Width="120px">
                        </asp:DropDownList>
                    </td>
                    <td class="textright">Tipo</td>
                    <td class="textleft">
                        <asp:DropDownList ID="ddlbtTipo" runat="server" CssClass="textleft" Width="135px">
                        </asp:DropDownList>
                    </td>
                    <td class="textright">Marca</td>
                    <td class="textleft">
                        <asp:DropDownList ID="ddlbMarca" runat="server" CssClass="textleft" Width="160px">
                        </asp:DropDownList>
                    </td>
                    <td class="textleft">
                        <asp:ImageButton ID="ibtnBuscar" runat="server" ImageUrl="~/Images/texto/btnBuscar.png" /></td>
                </tr>
                <tr><td class="textright">Orden</td>
                    <td class="textleft">
                        <asp:TextBox ID="txbOrden" runat="server" CssClass="textleft" Width="115px"></asp:TextBox></td>
                    <td class="textright">Serie Equipo</td>
                    <td class="textleft">
                        <asp:TextBox ID="txbSerie" runat="server" CssClass="textleft" Width="130px"></asp:TextBox>
                    </td>
                    <td class="textright">Caso</td>
                    <td class="textleft">
                        <asp:TextBox ID="txbCaso" runat="server" CssClass="textleft" Width="155px"></asp:TextBox>
                    </td>
                    <td class="textleft">
                        <asp:ImageButton ID="ibtnNuevo" runat="server" ImageUrl="~/Images/texto/btnAgregar.png" />
                    </td></tr>
                <tr><td class="textright">Cliente</td>
                    <td class="textleft">
                        <asp:TextBox ID="txbCliente" runat="server" CssClass="textleft" Width="115px"></asp:TextBox>
                    </td>
                    <td class="textright">Nro. Documento</td>
                    <td class="textleft ">
                        <asp:TextBox ID="txbDocumento" runat="server" CssClass="textleft" Width="130px"></asp:TextBox>
                    </td>
                    <td class="textright">Fecha</td>
                    <td class="textleft">
                        <asp:TextBox ID="txbInicio" runat="server" CssClass="textleft" Width="65px"></asp:TextBox>
                        <asp:CalendarExtender ID="txbInicio_CalendarExtender" runat="server" Enabled="True" TargetControlID="txbInicio" Format="dd/MM/yyyy">
                        </asp:CalendarExtender>
                        &nbsp;al &nbsp;<asp:TextBox ID="txbFin" runat="server" CssClass="textleft" Width="65px"></asp:TextBox>
                        <asp:CalendarExtender ID="txbFin_CalendarExtender" runat="server" Enabled="True" TargetControlID="txbFin" Format="dd/MM/yyyy" >
                        </asp:CalendarExtender>
                    </td>
                    <td class="textleft">
                        <asp:ImageButton ID="ibtnExportar" runat="server" ImageUrl="~/Images/texto/btnExportar.png" Visible="False" />
                    </td></tr>
                <tr><td class="textright">
                        <asp:Label ID="LblModalidad" runat="server" Text="Modalidad"></asp:Label>
                    </td>
                    <td class="textleft">
                        <asp:DropDownList ID="ddlbModalidad" runat="server" CssClass="textleft" Width="120px">
                        </asp:DropDownList>
                    </td>
                    <td  colspan="5">&nbsp;</td>
                </tr>
        </table>
            </center>
            <br />
            <asp:GridView ID="gridOrdenes" runat="server" AllowPaging="True" AutoGenerateColumns="False" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" PageSize="20" Width="95%">
                <Columns>
                    <asp:BoundField DataField="CodOrden" HeaderText="Orden" SortExpression="CodOrden" />
                    <asp:BoundField DataField="Fecha" HeaderText="Fecha" SortExpression="Fecha" />
                    <asp:BoundField DataField="Caso" HeaderText="Caso" SortExpression="Caso" />
                    <asp:BoundField DataField="Cliente" HeaderText="Cliente" SortExpression="Cliente" />
                    <asp:BoundField DataField="Equipo" HeaderText="Equipo" SortExpression="Equipo" />
                    <asp:BoundField DataField="Serie" HeaderText="Serie" SortExpression="Serie" />
                    <asp:BoundField DataField="Tecnico" HeaderText="Técnico" SortExpression="Tecnico" />
                    <asp:BoundField DataField="Estado" HeaderText="Estado" SortExpression="Estado" />
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:ImageButton ID="imgDetalle" runat="server" CommandName ="cnVerOrden" ImageUrl="~/Images/img/verDetalle.png" ToolTip="Ver Orden" />
                            <asp:ImageButton ID="imgNotas" runat="server" CommandName="cnNotas" ImageUrl="~/Images/img/verNota.png" ToolTip="Ver Notas" />
                            <asp:ImageButton ID="imgEditar" runat="server" CommandName="cnEditar" ImageUrl="~/Images/img/editarRegistro.png" ToolTip="Editar Orden" />
                            <asp:ImageButton ID="imgAgendar" runat="server" CommandName="cnAgendar" Height="18px" ImageUrl="~/Images/img/calendario.png" ToolTip="Agendar Orden" Width="16px" />
                            <asp:ImageButton ID="imgAnular" runat="server" CommandName="cnAnular" ImageUrl="~/Images/img/anulaRegistro.png" ToolTip="Anular Orden" />
                        </ItemTemplate>
                        <ItemStyle Width="100px" />
                    </asp:TemplateField>
                </Columns>
                <EmptyDataTemplate>
                    No existen registros
                </EmptyDataTemplate>
                <FooterStyle BackColor="White" ForeColor="#000066" />
                <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                <RowStyle ForeColor="#000066" />
                <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                <SortedAscendingCellStyle BackColor="#F1F1F1" />
                <SortedAscendingHeaderStyle BackColor="#007DBB" />
                <SortedDescendingCellStyle BackColor="#CAC9C9" />
                <SortedDescendingHeaderStyle BackColor="#00547E" />
            </asp:GridView>
            <br />
            <div class="textleft">
                <asp:Label ID="LblTotal" CssClass="textleft" runat="server" Text="Total: 0 Registro(s)"></asp:Label></div>
            </center>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>

</asp:Content>
